﻿using DotSpatial.Controls;
using DotSpatial.Data;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace KASEM
{
    public partial class Form2 : Form
    {
        Map mainMap;
        FeatureSet Fe;
        public Map MainMap
        {
            get { return mainMap; }
            set { mainMap = value; }
        }
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            Fe = MainMap.Layers[0].DataSet as FeatureSet;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show(Fe.NumRows().ToString()); 
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show(Fe.Projection.ToString() );
        }

        private void button3_Click(object sender, EventArgs e)
        {
            MessageBox.Show(Fe.Filename);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            dataGridView1.DataSource = Fe.DataTable; 
        }
    }
}
